#tree {
    display: inline-block;
    margin: auto;
    padding: 15px;
    cursor: move;
    z-index: 10;
}


/*
 * TREE
 */
.child, .relation, .person {
    display: inline-block;
    vertical-align: top;
}

.children {
    margin-top: -20px;
}

.child:not(.only) {
    float: left;
    margin-right: 20px;
}
.child:last-child {
    margin: 0;
}

.child > .person {
    margin-right: 20px;
}
.child > .person:last-child {
    margin-right: 0;
}
.child > .relation {
    margin-right: 20px;
}
.child > .relation:last-child {
    margin-right: 0;
}

.person {
    font-size: 11px;
    padding: 6px 12px;
    background: #FFF;
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    z-index: 500;
    width: 100px;
    border: 2px solid transparent;
    cursor: pointer;
}
.person.selected {
    border-color: #FF6A4A;
}
.person:hover {
    box-shadow: 0 0 3px rgba(255, 106, 74, 1);
}
/*.person.primary {*/
/*border-left-color: #888;*/
/*}*/
.person .birthdate {
    font-size: 10px;
    color: #999;
}


/*
 * LINKS
 */
.link {
    width: 100%;
    text-align: center;
}
.link-relation {
    display: inline-block;
    border-bottom: 2px solid #CCC;
    height: 20px;
    width: 20px;
    margin-left: -3px;
    margin-right: -3px;
}
.link-between {
    border-right: 2px solid #CCC;
    height: 35px;
    width: 50%;
    margin-left: -1px;
}

.link-children {
    border-top: 2px solid #CCC;
    height: 0;
    margin: 0 -10px 14px -10px;
}
.link-children.first {
    float: right;
    width: -webkit-calc(50% + 10px);
}
.link-children.first.decal {
    width: -webkit-calc(50% + 84px);
}
.link-children.last {
    float: left;
    width: -webkit-calc(50% + 10px);
}
.link-children.last.decal {
    width: -webkit-calc(50% - 64px);
}
.link-children.only {
    border-color: transparent;
}
.link-children.only.decal {
    border-color: #CCC;
    width: 80px;
}

.link-person {
    border-right: 2px solid #CCC;
    height: 16px;
    position: absolute;
    width: 49px;
    margin-top: -24px;
}